﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HomeController.cs" company="">
//   
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace MsForgeReboot.Web.Controllers {
    #region Usings

    using System.Collections.Generic;
    using System.Web.Mvc;
    using MsForgeReboot.Framework.Interfaces;
    using MsForgeReboot.Framework.ViewModels;

    #endregion

    /// <summary>
    /// The home controller.
    /// </summary>
    public class HomeController : Controller {

        private readonly ICarouselService _svcCarousel;

        public HomeController(ICarouselService s) {
            this._svcCarousel = s;
        }


        #region Public Methods and Operators

        /// <summary>
        /// The about.
        /// </summary>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult About() {
            this.ViewBag.Message = "Your app description page.";

            return this.View();
        }

        /// <summary>
        /// The contact.
        /// </summary>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult Contact() {
            this.ViewBag.Message = "Your contact page.";

            return this.View();
        }

        public ActionResult Profile() {
            this.ViewBag.Message = "This is your profile page";

            return View("Profile");
        }

        /// <summary>
        /// The index.
        /// </summary>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult Index() {
            this.ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";


            return this.View();
        }

        public ActionResult Carousel(int? id) {
            IEnumerable<CarouselViewModel> model = this._svcCarousel.GetHomePageCarousel(3);
            return PartialView(model);
        }

        #endregion
    }
}